package com.kfm.base.reflect;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.lang.reflect.Parameter;

/**
 *
 * @author 作者
 * @version v0.0.1
 */
public class Demo07 {

    /**
     *
     * @param args
     */
    public static void main(String[] args) {
        Class<Emp> empClass = Emp.class;

        // 注解
        Annotation[] annotations = empClass.getAnnotations();
        try {
            Method setDeptno = empClass.getDeclaredMethod("setDeptno", Integer.class);
            Parameter[] parameters = setDeptno.getParameters();

        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        }
    }
}
